/*
 * @Author: bsj
 * @Date: 2024-04-03
 * @LastEditors: baoshijie
 * @LastEditTime: 2024-08-01
 * @Description: file content
 * @FilePath: \bridge_web\src\utils\publicData.js
 */
export const tableHeadMonitor = [
  {
    label: "计划执行日期",
    prop: "missionDate",
    width: "120",
  },
  {
    label: "航班号",
    prop: "oriFlightID",
    // width: "100",
  },
  {
    label: "进离港标识",
    prop: "direction",
    // width: "100",
  },
  {
    label: "起飞机场",
    prop: "depAP",
    // width: "100",
  },
  {
    label: "落地机场",
    prop: "arrAP",
    // width: "100",
  },
  {
    label: "计起",
    prop: "sobt",
    // width: "130",
  },
  {
    label: "计落",
    prop: "sibt",
    // width: "130",
  },
  {
    label: "任务性质",
    prop: "stask",
    // width: "100",
  },
  // {
  //   label: "机型",
  //   prop: "paircraftType",
  //   width: "100",
  // },
  // {
  //   label: "过夜/非过夜",
  //   prop: "overnight",
  //   width: "120",
  // },
  {
    label: "机位",
    prop: "stand",
    // width: "100",
  },
  // {
  //   label: "机位分类",
  //   prop: "airStandMaxType",
  //   width: "120",
  // },
  {
    label: "机位属性",
    prop: "airStandProperty",
    // width: "120",
  },
  {
    label: "靠桥标识",
    prop: "bridging",
    // width: "140",
  },
  {
    label: "未靠桥原因",
    prop: "unbridgingReason",
    // width: "140",
  }
];
export const tableHeadList = [
  {
    label: "计划执行日",
    prop: "recordDate",
    width: "100",
  },
  {
    label: "航班号",
    prop: "oriFlightID",
    width: "100",
  },
  {
    label: "起飞机场",
    prop: "depAP",
    width: "100",
  },
  {
    label: "落地机场",
    prop: "arrAP",
    width: "100",
  },
  {
    label: "计划离港时间",
    prop: "sobt",
    width: "130",
  },
  {
    label: "实际起飞时间",
    prop: "atot",
    width: "130",
  },
  {
    label: "计划到港时间",
    prop: "sibt",
    width: "130",
  },
  {
    label: "实际落地时间",
    prop: "aldt",
    width: "130",
  },
  // {
  //   label: "实际靠桥时间",
  //   prop: "abip",
  //   width: "130",
  // },
  {
    label: "任务性质",
    prop: "sgj",
    width: "100",
  },
  {
    label: "机型",
    prop: "paircraftType",
    width: "100",
  },
  // {
  //   label: "旅客人数",
  //   prop: "passengerSum",
  //   width: "100",
  // },
  {
    label: "离港机位",
    prop: "depStand",
    width: "100",
  },
  {
    label: "始发/过站",
    prop: "intialFlight",
    width: "120",
  },

  {
    label: "离港机位分类",
    prop: "depStandMaxType",
    width: "120",
  },
  {
    label: "离港机位属性",
    prop: "depStandProperty",
    width: "120",
  },
  {
    label: "离港靠桥标识",
    prop: "depBridging",
    width: "140",
  },
  {
    label: "离港未靠桥原因",
    prop: "depUnbridgingReason",
    width: "140",
  }, {
    label: "到港机位",
    prop: "arrStand",
    width: "100",
  },
  {
    label: "过夜/非过夜",
    prop: "overnight",
    width: "120",
  },

  {
    label: "到港机位分类",
    prop: "arrStandMaxType",
    width: "120",
  },
  {
    label: "到港机位属性",
    prop: "arrStandProperty",
    width: "120",
  },
  {
    label: "到港靠桥标识",
    prop: "arrBridging",
    width: "140",
  },
  {
    label: "到港未靠桥原因",
    prop: "arrUnbridgingReason",
    width: "140",
  },
  {
    label: "测算标识",
    prop: "unbridgingReason",
    width: "140",
  },
  // {
  //   label: "离港/到港",
  //   prop: "irection",
  //   width: "100",
  // },



];
export const reasonList = [
  {
    label: "远机位",
    value: "远机位",
  },
  {
    label: "近机位且使用摆渡车",
    value: "近机位且使用摆渡车",
  },
  {
    label: "未关联到停机位信息",
    value: "未关联到停机位信息",
  },
  {
    label: "未提供停机位",
    value: "未提供停机位",
  },
];
export const bridgeStatusList = [
  { label: "全部", value: "" },
  {
    label: "靠桥",
    value: "靠桥",
  },
  {
    label: "未靠桥",
    value: "未靠桥",
  },
  {
    label: "不考核",
    value: "不考核",
  },
];
export const rangeList = [
  {
    label: "全部",
    value: "",
  },
  {
    label: "离港",
    value: "D",
  },
  {
    label: "进港",
    value: "A",
  },
];
export const calculateList = [
  {
    label: "全部",
    value: "",
  },
  {
    label: "测算",
    value: "1",
  },
  {
    label: "不测算",
    value: "0",
  },
];
export const airstandpropertyList = [
  {
    label: "远机位",
    value: "0",
  }, {
    label: "国内近机位",
    value: "1",
  }, {
    label: "国际近机位",
    value: "2",
  }, {
    label: "国内/国际混合机位",
    value: "3",
  }, {
    label: "维修机位",
    value: "4",
  }
]
export const tableHeadMonitorDialog = [
  {
    label: "计划执行日期",
    prop: "missionDate",
  },
  {
    label: "航班号",
    prop: "oriFlightID",
  },
  {
    label: "进离港标识",
    prop: "direction",
  },
  {
    label: "起飞机场",
    prop: "depAP",
  },
  {
    label: "落地机场",
    prop: "arrAP",
  },
  {
    label: "计划起飞时间",
    prop: "sobt",
  },
  {
    label: "计划降落时间",
    prop: "sibt",
  },
  {
    label: "机型",
    prop: "paircraftType",
  },
  {
    label: "机位",
    prop: "stand",
    width: "100",
  }, {
    label: "机位属性",
    prop: "airStandProperty",
    width: "150",
  }
  , {
    label: "靠桥标识",
    prop: "bridging",
  },
  {
    label: "未靠桥原因",
    prop: "unbridgingReason",
  }
];
export const tableHeadOpt = [
  {
    label: "计划执行日期",
    prop: "missionDate",
    width: "120",
  },
  {
    label: "航班号",
    prop: "callSign",
  },
  {
    label: "计划起飞时间",
    prop: "sobt",
  },
  {
    label: "计划降落时间",
    prop: "sibt",
  },
  {
    label: "分配机位",
    prop: "stand",
  },
  {
    label: "操作时间",
    prop: "createTime",
  },
  {
    label: "操作人",
    prop: "userName",
  }
]
// 列表数据格式化
export const formatterFun = (row, column, cellValue, index) => {
  if (column.property == 'direction') {
    return rangeList.find(item => item.value === cellValue).label
  }
  return cellValue
}

/**
 * @description: 机位属性
 * @param {*} val
 * @return {*}
 */
export const formatterAirstandproper = (val) => {
  return val ? airstandpropertyList.find(item => item.value == val).label : ''
}

export const formatterRangeList = (val) => {
  return val ? rangeList.find(item => item.value === val).label : ''
}
export const airstandpropertyKey ={
  0: "否/远机位",
  1: "是/国内近机位",
  2: "是/国际近机位",
  3: "是/国内/国际混合机位",
  4: "否/维修机位"
}
